<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h3 style="text-align: center;">请选择支付类型</h3>
<form action="http://www.lican.xyz:81/weixiao/index.php" method="post">
    <div style="text-align: center;">

        <select name="type" style="width:200px;">
            <option value="0">请选择支付类型</option>
            <option value="1">公众号支付</option>
            <option value="2">非实名支付</option>
        </select>
    </div>

    <div style="text-align: center;margin-top: 50px;">
        <input type="submit" value="测试将支付1分钱">
    </div>

</form>


</body>
</html>

<script src="js/jquery.js"></script>
<script>
    function send() {
       var card_number = $("input[name='card_number']").val();
       var type = $("select option:selected").val();

       $.ajax({
           url:"http://www.lican.xyz:81/weixiao/public/pay.php",
           type:"post",
           data:{type:type, card_number:card_number},
           success:function(res){
               console.log(res);
               alert(res)
           },
           error:function(error){
               alert('fail');
           }
       });
    }
</script>
